package com.study.yangfei.mystudy.activity;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.study.yangfei.mystudy.R;
import com.study.yangfei.mystudy.data.User;
import com.study.yangfei.mystudy.databinding.ActivityDataBindBinding;

public class DataBindActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_data_bind);

        ActivityDataBindBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_data_bind);
        User user = new User("Test", "User ddd",38);

        binding.setUser(user);
    }

}
